const path = require('path');
let a = '/a/b';
let b = '/a/b/c/e';
console.log(path.relative(a, b));// /c/d
console.log(path.dirname(b));//